package com.action.suport;

import com.db.suport.*;

public class InsertAction {

	private String id;
	private String subject;
	private String content;
	private String pwd;

	private int boardtype;
	private SuportDAO suport;

	public SuportDAO getSuport() {
		return suport;
	}

	public void setSuport(SuportDAO suport) {
		this.suport = suport;
	}

	public int getBoardtype() {
		return boardtype;
	}

	public void setBoardtype(int boardtype) {
		this.boardtype = boardtype;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String insert() throws Exception {

		SuportVO vo = new SuportVO();
		vo.setId(id);
		vo.setSubject(subject);
		vo.setContent(content);
		vo.setPwd(pwd);
		vo.setType(boardtype);

		suport.suportInsert(vo);

		return "success";
	}
}
